package com.whoimi.admin.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author whoimi
 * @since 2025-07-29T09:12:41.774422100
 */

@Table(name = "sys_user_notice", schema = "wiic_admin")
public class UserNotice implements Serializable {

    @Serial
    private static final long serialVersionUID = 6284071542230788965L;

    /**
     * id
     */
    @Id
    @Column("id")
    private Long id;

    /**
     * 公共通知id
     */
    @Column("notice_id")
    private Long noticeId;
//    AggregateReference<Notice, Long> notice;
    /**
     * 用户
     */
    @Column("username")
    private String username;

    /**
     * 读取状态（0: 未读, 1: 已读）
     */
    @Column("is_read")
    private boolean isRead;

    /**
     * 阅读时间
     */
    @Column("read_time")
    private LocalDateTime readTime;

    /**
     * 创建时间
     */
    @Column("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Column("update_time")
    private LocalDateTime updateTime;

    /**
     * 逻辑删除(0: 未删除, 1: 已删除)
     */
    @Column("is_deleted")
    private Boolean isDeleted;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getNoticeId() {
        return this.noticeId;
    }

    public void setNoticeId(Long noticeId) {
        this.noticeId = noticeId;
    }


//    public AggregateReference<Notice, Long> getNotice() {
//        return notice;
//    }
//
//    public void setNotice(AggregateReference<Notice, Long> notice) {
//        this.notice = notice;
//    }

//    public boolean getIsRead() {
//        return isRead;
//    }
//
//    public void setIsRead(boolean isRead) {
//        this.isRead = isRead;
//    }


    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean deleted) {
        isDeleted = deleted;
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public boolean getIsRead() {
        return this.isRead;
    }

    public void setIsRead(boolean isRead) {
        this.isRead = isRead;
    }

    public LocalDateTime getReadTime() {
        return this.readTime;
    }

    public void setReadTime(LocalDateTime readTime) {
        this.readTime = readTime;
    }

    public LocalDateTime getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Boolean getIsDeleted() {
        return this.isDeleted;
    }

    public void setIsDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

}
